//---------------------------------------------------------------------------

#ifndef h_stageH
#define h_stageH
//---------------------------------------------------------------------------
#include "h_xml.h"

class HStageIcon;
class HBatchIcon;

class HStage
{
public :

   __fastcall HStage(void);
   virtual __fastcall ~HStage(void);
   virtual HStage * __fastcall Clone(void) = 0;
   virtual UTF8String __fastcall GetType(void) = 0;
   virtual bool __fastcall EditProperty(bool PartFlag = false) = 0;
   virtual void __fastcall LoadProperty(h_xml::HXmlTree *Node, bool XmlPropertyFlag) = 0;
   virtual void __fastcall RefreshProperty(h_xml::HXmlTree *Node, bool XmlPropertyFlag) = 0;
   virtual UTF8String __fastcall GetCaption(void) = 0;
   virtual int __fastcall GetIconType(void) = 0;
   virtual int __fastcall GetIconEnlarge(void) = 0;
   virtual void __fastcall GetIconSize(int &Width, int &Height) = 0;
   virtual void __fastcall SetColor(void) = 0;
   virtual UTF8String __fastcall GetStatus(void) = 0;
   virtual void __fastcall SetStatus(const UTF8String &Status) = 0;
   virtual void __fastcall GetJobListInfo(HJobListInfo &Info);
   virtual void __fastcall GetPartTimeInfo(vector<HPartTimeInfo> &PartVec)
   {}
   virtual bool __fastcall GetGanttInfo(const TDateTime &StartTime,
      const TDateTime &EndTime, bool PartitionFlag, int Time, HGanttInfo &Info)
   {
      return false;
   }
   virtual UTF8String __fastcall GetRestoreStatus(void)
   {
      return "";
   }
   virtual void __fastcall SetRestoreStatus(const UTF8String &Status)
   {
   }
   virtual UTF8String __fastcall GetHint()
   {
      return "";
   }
   virtual bool __fastcall CanSkip()
   {
      return false;
   }
   virtual bool __fastcall CanRestore()
   {
      return false;
   }
   virtual bool __fastcall CanRerun()
   {
      return false;
   }
   virtual bool __fastcall CanRestart()
   {
      return false;
   }
   virtual bool __fastcall CanStop()
   {
      return false;
   }
   virtual bool __fastcall CanViewLog()
   {
      return false;
   }
   virtual bool __fastcall CanViewAdditionalLog()
   {
      return false;
   }
   virtual bool __fastcall CanViewRestoreLog()
   {
      return false;
   }
   virtual bool __fastcall CanChangeCondition()
   {
      return false;
   }
   virtual bool __fastcall CanBreakpoint()
   {
      return false;
   }
   virtual void __fastcall GetJobCondition(bool &CondNot,
      UTF8String &ConditionFile, UTF8String &SpecialDate,
      UTF8String &LoopStartTime, UTF8String &LoopEndTime)
   {
      CondNot = false;
      ConditionFile = "";
      SpecialDate = "";
      LoopStartTime = "";
      LoopEndTime = "";
   }
   virtual void __fastcall SetJobCondition(bool CondNot,
      const UTF8String &ConditionFile, const UTF8String &SpecialDate,
      const UTF8String &LoopStartTime, const UTF8String &LoopEndTime)
   {
   }

   UTF8String __fastcall GetGroupId(void);
   virtual UTF8String __fastcall GetEventName()
   {
      return "";
   }
   virtual bool __fastcall GetPartFlag()
   {
      return false;
   }
   void __fastcall SetGroupId(const UTF8String &GroupId);
   UTF8String __fastcall GetName(void);
   void __fastcall SetName(const UTF8String &Name);
   HStageIcon * __fastcall GetIcon(void);
   TLabel * __fastcall GetLabel();
   void __fastcall CreateIcon(TWinControl * Parent);
   void __fastcall Move(int x, int y);
   void __fastcall RefreshCaption(void);
   void __fastcall FuncSkipJob(void);
   void __fastcall FuncRerunJob(void);
   void __fastcall FuncStopJob(void);
   void __fastcall AdjustLabel();
   void __fastcall AddToSuccJobSet(const UTF8String &JobName)
   {
      FSuccJobSet.insert(JobName);
   }
   void __fastcall IncInDegreeWithinGroup()
   {
      FInDegreeWithinGroup++;
   }
   static int __fastcall StringToAlarmTimeType(const UTF8String &Str);
   static UTF8String __fastcall AlarmTimeTypeToString(int Type);

private :

   UTF8String FGroupId;
   UTF8String FName;
   HStageIcon *FIcon;
   TLabel *FLabel;
   set<UTF8String> FSuccJobSet;
   int FInDegreeWithinGroup;
};

class HStageJob : public HStage
{
public :

   __fastcall HStageJob(void);
   virtual HStage * __fastcall Clone(void);
   virtual UTF8String __fastcall GetType(void);
   virtual bool __fastcall EditProperty(bool PartFlag = false);
   virtual void __fastcall LoadProperty(h_xml::HXmlTree *Node, bool XmlPropertyFlag);
   virtual void __fastcall RefreshProperty(h_xml::HXmlTree *Node, bool XmlPropertyFlag);
   virtual UTF8String __fastcall GetCaption(void);
   virtual int __fastcall GetIconType(void);
   virtual int __fastcall GetIconEnlarge(void);
   virtual void __fastcall GetIconSize(int &Width, int &Height);
   virtual UTF8String __fastcall GetHint();
   virtual void __fastcall SetColor(void);
   virtual UTF8String __fastcall GetStatus(void);
   virtual void __fastcall SetStatus(const UTF8String &Status);
   virtual void __fastcall GetJobListInfo(HJobListInfo &JobListInfo);
   virtual void __fastcall GetPartTimeInfo(vector<HPartTimeInfo> &PartVec);
   virtual bool __fastcall GetGanttInfo(const TDateTime &StartTime,
      const TDateTime &EndTime, bool PartitionFlag, int Time, HGanttInfo &GanttInfo);
   virtual UTF8String __fastcall GetRestoreStatus(void);
   virtual void __fastcall SetRestoreStatus(const UTF8String &Status);
   virtual bool __fastcall CanSkip();
   virtual bool __fastcall CanRestore();
   virtual bool __fastcall CanRerun();
   virtual bool __fastcall CanRestart();
   virtual bool __fastcall CanStop();
   virtual bool __fastcall CanViewLog();
   virtual bool __fastcall CanViewAdditionalLog();
   virtual bool __fastcall CanViewRestoreLog();
   virtual bool __fastcall CanChangeCondition();
   virtual bool __fastcall CanBreakpoint();
   virtual void __fastcall GetJobCondition(bool &CondNot,
      UTF8String &ConditionFile, UTF8String &SpecialDate,
      UTF8String &LoopStartTime, UTF8String &LoopEndTime);
   virtual void __fastcall SetJobCondition(bool CondNot,
      const UTF8String &ConditionFile, const UTF8String &SpecialDate,
      const UTF8String &LoopStartTime, const UTF8String &LoopEndTime);
   virtual bool __fastcall GetPartFlag()
   {
      return FInfo.PartFlag;
   }
   bool __fastcall GetBreakpointFlag()
   {
      return FInfo.BreakpointFlag;
   }

   struct HPartInfo
   {
      UTF8String Id;
      UTF8String Status;
      int StatusInt;
      UTF8String RestoreStatus;
      UTF8String StartTime;
      UTF8String EndTime;
      UTF8String Elapsed;
      int ServerId;
      int Pid;
      HPartInfo()
         : ServerId(0), Pid(0), StatusInt(0)
      {}
   };

   struct HInfo
   {
      UTF8String Name;
      UTF8String Command;
      UTF8String RestoreCommand;
      UTF8String Description;
      UTF8String SpecialDate;
      UTF8String BusinessType;
      bool CondNot;
      UTF8String ConditionFile;
      UTF8String AdditionalLog;
      int AlarmTimeType;
      UTF8String AlarmTime;
      UTF8String JobTrigger;
      UTF8String PartitionFile;
      bool Exclusive;
      int ParallelJobNumber;
      int Priority;
      UTF8String AutoRerun;
      int Enlarge;
      bool Anchor;
      UTF8String Tag;
      UTF8String RunningGroup;
      UTF8String ResourceListStr;
      UTF8String ExternJobListStr;
      vector<UTF8String> ExternJobList;
      UTF8String LoopStartTime;
      UTF8String LoopEndTime;
      UTF8String LoopInterval;
      UTF8String LoopCount;
      UTF8String LoopConditionVariable;

      UTF8String Status;
      UTF8String RestoreStatus;
      UTF8String StartTime;
      UTF8String EndTime;
      UTF8String LastStartTime;
      int IdleTimeSum;
      int ServerId;
      int Pid;
      bool PartFlag;
      map<UTF8String, HPartInfo> PartMap;
      bool CalcFlag;
      UTF8String TotalElapsed;
      UTF8String Imbalanced;
      bool BreakpointFlag;
      __fastcall HInfo()
      {
         CondNot = false;
         AlarmTimeType = 0;
         Exclusive = false;
         ParallelJobNumber = 0;
         Priority = 0;
         Enlarge = 0;
         Anchor = false;
         IdleTimeSum = 0;
         ServerId = 0;
         Pid = 0;
         PartFlag = false;
         CalcFlag = false;
         BreakpointFlag = false;
      }
   };

   void __fastcall GetInfo(HInfo &Info);
   void __fastcall LoadProperty_aux(h_xml::HXmlTree *Node,
      bool XmlPropertyFlag, HString &StatusStr);

private :

   HInfo FInfo;
};

class HStageConnector : public HStage
{
public :

   virtual HStage * __fastcall Clone(void);
   virtual UTF8String __fastcall GetType(void);
   virtual bool __fastcall EditProperty(bool PartFlag = false);
   virtual void __fastcall LoadProperty(h_xml::HXmlTree *Node, bool XmlPropertyFlag);
   virtual void __fastcall RefreshProperty(h_xml::HXmlTree *Node, bool XmlPropertyFlag);
   virtual UTF8String __fastcall GetCaption(void);
   virtual int __fastcall GetIconType(void);
   virtual int __fastcall GetIconEnlarge(void);
   virtual void __fastcall GetIconSize(int &Width, int &Height);
   virtual UTF8String __fastcall GetHint();
   virtual void __fastcall SetColor(void);
   virtual UTF8String __fastcall GetStatus(void);
   virtual void __fastcall SetStatus(const UTF8String &Status);
   virtual void __fastcall GetJobListInfo(HJobListInfo &JobListInfo);
   virtual void __fastcall GetPartTimeInfo(vector<HPartTimeInfo> &PartVec)
   {}

   struct HInfo
   {
      bool HideArrow;
      HInfo() : HideArrow(false)
      {}
   };

   void __fastcall GetInfo(HInfo &Info);

private :

   HInfo FInfo;
};

class HStageExternJob : public HStage
{
public :

   virtual HStage * __fastcall Clone(void);
   virtual UTF8String __fastcall GetType(void);
   virtual bool __fastcall EditProperty(bool PartFlag = false);
   virtual void __fastcall LoadProperty(h_xml::HXmlTree *Node, bool XmlPropertyFlag);
   virtual void __fastcall RefreshProperty(h_xml::HXmlTree *Node, bool XmlPropertyFlag);
   virtual UTF8String __fastcall GetCaption(void);
   virtual int __fastcall GetIconType(void);
   virtual int __fastcall GetIconEnlarge(void);
   virtual void __fastcall GetIconSize(int &Width, int &Height);
   virtual UTF8String __fastcall GetHint();
   virtual void __fastcall SetColor(void);
   virtual UTF8String __fastcall GetStatus(void);
   virtual void __fastcall SetStatus(const UTF8String &Status);
   virtual void __fastcall GetJobListInfo(HJobListInfo &JobListInfo);
   virtual void __fastcall GetPartTimeInfo(vector<HPartTimeInfo> &PartVec)
   {}

   struct HInfo
   {
      UTF8String ExternGroup;
      UTF8String ExternJob;
      UTF8String Description;
      int Enlarge;
      UTF8String Status;
      UTF8String StartTime;
      UTF8String EndTime;
      int IdleTimeSum;
      __fastcall HInfo()
      {
         Enlarge = 0;
         IdleTimeSum = 0;
      }
   };

   void __fastcall GetInfo(HInfo &Info);

private :

   HInfo FInfo;
};

class HStageEventFire : public HStage
{
public :

   virtual HStage * __fastcall Clone(void);
   virtual UTF8String __fastcall GetType(void);
   virtual bool __fastcall EditProperty(bool PartFlag = false);
   virtual void __fastcall LoadProperty(h_xml::HXmlTree *Node, bool XmlPropertyFlag);
   virtual void __fastcall RefreshProperty(h_xml::HXmlTree *Node, bool XmlPropertyFlag);
   virtual UTF8String __fastcall GetCaption(void);
   virtual int __fastcall GetIconType(void);
   virtual int __fastcall GetIconEnlarge(void);
   virtual void __fastcall GetIconSize(int &Width, int &Height);
   virtual UTF8String __fastcall GetHint();
   virtual void __fastcall SetColor(void);
   virtual UTF8String __fastcall GetStatus(void);
   virtual void __fastcall SetStatus(const UTF8String &Status);
   virtual void __fastcall GetJobListInfo(HJobListInfo &JobListInfo);
   virtual void __fastcall GetPartTimeInfo(vector<HPartTimeInfo> &PartVec);
   virtual UTF8String __fastcall GetRestoreStatus(void);
   virtual bool __fastcall CanSkip();
   virtual bool __fastcall CanRestore();
   virtual bool __fastcall CanRerun();
   virtual bool __fastcall CanRestart();
   virtual bool __fastcall CanStop();
   virtual bool __fastcall CanViewLog();
   virtual bool __fastcall CanViewAdditionalLog();
   virtual bool __fastcall CanChangeCondition();
   virtual void __fastcall GetJobCondition(bool &CondNot,
      UTF8String &ConditionFile, UTF8String &SpecialDate,
      UTF8String &LoopStartTime, UTF8String &LoopEndTime);
   virtual void __fastcall SetJobCondition(bool CondNot,
      const UTF8String &ConditionFile, const UTF8String &SpecialDate,
      const UTF8String &LoopStartTime, const UTF8String &LoopEndTime);

   struct HInfo
   {
      UTF8String Name;
      UTF8String HostName;
      UTF8String Event;
      UTF8String Description;
      UTF8String SpecialDate;
      bool CondNot;
      UTF8String ConditionFile;
      UTF8String JobTrigger;
      int Priority;
      UTF8String AutoRerun;
      UTF8String Tag;
      UTF8String ExternJobListStr;
      vector<UTF8String> ExternJobList;

      UTF8String Status;
      UTF8String RestoreStatus;
      UTF8String StartTime;
      UTF8String EndTime;
      int IdleTimeSum;
      int ServerId;
      int Pid;
      __fastcall HInfo()
      {
         CondNot = false;
         Priority = 0;
         IdleTimeSum = 0;
         ServerId = 0;
         Pid = 0;
      }
   };

   void __fastcall GetInfo(HInfo &Info);

private :

   HInfo FInfo;
};

class HStageEventWait : public HStage
{
public :

   virtual HStage * __fastcall Clone(void);
   virtual UTF8String __fastcall GetType(void);
   virtual bool __fastcall EditProperty(bool PartFlag = false);
   virtual void __fastcall LoadProperty(h_xml::HXmlTree *Node, bool XmlPropertyFlag);
   virtual void __fastcall RefreshProperty(h_xml::HXmlTree *Node, bool XmlPropertyFlag);
   virtual UTF8String __fastcall GetCaption(void);
   virtual int __fastcall GetIconType(void);
   virtual int __fastcall GetIconEnlarge(void);
   virtual void __fastcall GetIconSize(int &Width, int &Height);
   virtual UTF8String __fastcall GetHint();
   virtual void __fastcall SetColor(void);
   virtual UTF8String __fastcall GetStatus(void);
   virtual void __fastcall SetStatus(const UTF8String &Status);
   virtual void __fastcall GetJobListInfo(HJobListInfo &JobListInfo);
   virtual void __fastcall GetPartTimeInfo(vector<HPartTimeInfo> &PartVec);
   virtual UTF8String __fastcall GetRestoreStatus(void);
   virtual bool __fastcall CanSkip();
   virtual bool __fastcall CanRestore();
   virtual bool __fastcall CanRerun();
   virtual bool __fastcall CanRestart();
   virtual bool __fastcall CanStop();
   virtual bool __fastcall CanViewLog();
   virtual bool __fastcall CanViewAdditionalLog();
   virtual bool __fastcall CanChangeCondition();
   virtual void __fastcall GetJobCondition(bool &CondNot,
      UTF8String &ConditionFile, UTF8String &SpecialDate,
      UTF8String &LoopStartTime, UTF8String &LoopEndTime);
   virtual void __fastcall SetJobCondition(bool CondNot,
      const UTF8String &ConditionFile, const UTF8String &SpecialDate,
      const UTF8String &LoopStartTime, const UTF8String &LoopEndTime);

   struct HInfo
   {
      UTF8String Name;
      UTF8String Event;
      UTF8String WaitForFile;
      UTF8String WaitForTime;
      UTF8String WaitForCommand;
      bool WaitForOperator;
      UTF8String Description;
      UTF8String SpecialDate;
      bool CondNot;
      UTF8String ConditionFile;
      UTF8String JobTrigger;
      int Priority;
      UTF8String AutoRerun;
      UTF8String Tag;
      UTF8String ExternJobListStr;
      vector<UTF8String> ExternJobList;

      UTF8String Status;
      UTF8String RestoreStatus;
      UTF8String StartTime;
      UTF8String EndTime;
      int IdleTimeSum;
      int ServerId;
      int Pid;
      __fastcall HInfo()
      {
         WaitForOperator = false;
         CondNot = false;
         Priority = 0;
         IdleTimeSum = 0;
         ServerId = 0;
         Pid = 0;
      }
   };

   void __fastcall GetInfo(HInfo &Info);
   virtual UTF8String __fastcall GetEventName()
   {
      return FInfo.Event;
   }

private :

   HInfo FInfo;
};

class HStageGroup : public HStage
{
public :

   virtual HStage * __fastcall Clone(void);
   virtual UTF8String __fastcall GetType(void);
   virtual bool __fastcall EditProperty(bool PartFlag = false);
   virtual void __fastcall LoadProperty(h_xml::HXmlTree *Node, bool XmlPropertyFlag);
   virtual void __fastcall RefreshProperty(h_xml::HXmlTree *Node, bool XmlPropertyFlag);
   virtual UTF8String __fastcall GetCaption(void);
   virtual int __fastcall GetIconType(void);
   virtual int __fastcall GetIconEnlarge(void);
   virtual void __fastcall GetIconSize(int &Width, int &Height);
   virtual UTF8String __fastcall GetHint();
   virtual void __fastcall SetColor(void);
   virtual UTF8String __fastcall GetStatus(void);
   virtual void __fastcall SetStatus(const UTF8String &Status);
   virtual void __fastcall GetJobListInfo(HJobListInfo &JobListInfo);
   virtual void __fastcall GetPartTimeInfo(vector<HPartTimeInfo> &PartVec)
   {}
   virtual bool __fastcall CanRerun();
   virtual bool __fastcall CanRestart();
   virtual bool __fastcall CanChangeCondition();
   virtual void __fastcall GetJobCondition(bool &CondNot,
      UTF8String &ConditionFile, UTF8String &SpecialDate,
      UTF8String &LoopStartTime, UTF8String &LoopEndTime);
   virtual void __fastcall SetJobCondition(bool CondNot,
      const UTF8String &ConditionFile, const UTF8String &SpecialDate,
      const UTF8String &LoopStartTime, const UTF8String &LoopEndTime);

   struct HInfo
   {
      UTF8String Group;
      UTF8String Description;
      UTF8String SpecialDate;
      UTF8String BusinessType;
      bool CondNot;
      UTF8String ConditionFile;
      int ParallelJobNumber;
      int Priority;
      UTF8String AutoRerun;
      int Enlarge;
      UTF8String Tag;
      UTF8String RunningGroup;
      UTF8String ExternJobListStr;
      vector<UTF8String> ExternJobList;

      UTF8String Status;
      UTF8String StartTime;
      int IdleTimeSum;
      UTF8String EndTime;
      __fastcall HInfo()
      {
         CondNot = false;
         ParallelJobNumber = 0;
         Priority = 0;
         Enlarge = 0;
         IdleTimeSum = 0;
      }
   };

   void __fastcall GetInfo(HInfo &Info);

private :

   HInfo FInfo;
};

class HStageTime : public HStage
{
public :

   virtual HStage * __fastcall Clone(void);
   virtual UTF8String __fastcall GetType(void);
   virtual bool __fastcall EditProperty(bool PartFlag = false);
   virtual void __fastcall LoadProperty(h_xml::HXmlTree *Node, bool XmlPropertyFlag);
   virtual void __fastcall RefreshProperty(h_xml::HXmlTree *Node, bool XmlPropertyFlag);
   virtual UTF8String __fastcall GetCaption(void);
   virtual int __fastcall GetIconType(void);
   virtual int __fastcall GetIconEnlarge(void);
   virtual void __fastcall GetIconSize(int &Width, int &Height);
   virtual UTF8String __fastcall GetHint();
   virtual void __fastcall SetColor(void);
   virtual UTF8String __fastcall GetStatus(void);
   virtual void __fastcall SetStatus(const UTF8String &Status);
   virtual void __fastcall GetJobListInfo(HJobListInfo &JobListInfo);
   virtual void __fastcall GetPartTimeInfo(vector<HPartTimeInfo> &PartVec);
   virtual UTF8String __fastcall GetRestoreStatus(void);
   virtual bool __fastcall CanSkip();
   virtual bool __fastcall CanRestore();
   virtual bool __fastcall CanRerun();
   virtual bool __fastcall CanRestart();
   virtual bool __fastcall CanStop();
   virtual bool __fastcall CanViewLog();
   virtual bool __fastcall CanViewAdditionalLog();
   virtual bool __fastcall CanChangeCondition();
   virtual void __fastcall GetJobCondition(bool &CondNot,
      UTF8String &ConditionFile, UTF8String &SpecialDate,
      UTF8String &LoopStartTime, UTF8String &LoopEndTime);
   virtual void __fastcall SetJobCondition(bool CondNot,
      const UTF8String &ConditionFile, const UTF8String &SpecialDate,
      const UTF8String &LoopStartTime, const UTF8String &LoopEndTime);

   struct HInfo
   {
      UTF8String Name;
      UTF8String Time;
      UTF8String Description;
      UTF8String SpecialDate;
      bool CondNot;
      UTF8String ConditionFile;
      UTF8String Tag;
      UTF8String ExternJobListStr;
      vector<UTF8String> ExternJobList;

      UTF8String Status;
      UTF8String RestoreStatus;
      UTF8String StartTime;
      UTF8String EndTime;
      int IdleTimeSum;
      int ServerId;
      int Pid;
      __fastcall HInfo()
      {
         CondNot = false;
         IdleTimeSum = 0;
         ServerId = 0;
         Pid = 0;
      }
   };

   void __fastcall GetInfo(HInfo &Info);

private :

   HInfo FInfo;
};

class HStageBatch : public HStage
{
public :

   virtual HStage * __fastcall Clone(void);
   virtual UTF8String __fastcall GetType(void);
   virtual bool __fastcall EditProperty(bool PartFlag = false);
   virtual void __fastcall LoadProperty(h_xml::HXmlTree *Node, bool XmlPropertyFlag);
   virtual void __fastcall RefreshProperty(h_xml::HXmlTree *Node, bool XmlPropertyFlag);
   virtual UTF8String __fastcall GetCaption(void);
   virtual int __fastcall GetIconType(void);
   virtual int __fastcall GetIconEnlarge(void);
   virtual void __fastcall GetIconSize(int &Width, int &Height);
   virtual UTF8String __fastcall GetHint();
   virtual void __fastcall SetColor(void);
   virtual UTF8String __fastcall GetStatus(void);
   virtual void __fastcall SetStatus(const UTF8String &Status);
   virtual void __fastcall GetJobListInfo(HJobListInfo &JobListInfo);
   virtual void __fastcall GetPartTimeInfo(vector<HPartTimeInfo> &PartVec);
   virtual UTF8String __fastcall GetRestoreStatus(void);
   virtual bool __fastcall CanSkip();
   virtual bool __fastcall CanRestore();
   virtual bool __fastcall CanRerun();
   virtual bool __fastcall CanRestart();
   virtual bool __fastcall CanStop();
   virtual bool __fastcall CanViewLog();
   virtual bool __fastcall CanViewAdditionalLog();
   virtual bool __fastcall CanChangeCondition();
   virtual void __fastcall GetJobCondition(bool &CondNot,
      UTF8String &ConditionFile, UTF8String &SpecialDate,
      UTF8String &LoopStartTime, UTF8String &LoopEndTime);
   virtual void __fastcall SetJobCondition(bool CondNot,
      const UTF8String &ConditionFile, const UTF8String &SpecialDate,
      const UTF8String &LoopStartTime, const UTF8String &LoopEndTime);

   struct HInfo
   {
      UTF8String Name;
      UTF8String Caption;
      UTF8String HostName;
      UTF8String Batch;
      bool SendDate;
      UTF8String DateVarName;
      UTF8String Description;
      UTF8String SpecialDate;
      bool CondNot;
      UTF8String ConditionFile;
      int Enlarge;
      UTF8String Tag;
      int AlarmTimeType;
      UTF8String AlarmTime;
      UTF8String ExternJobListStr;
      vector<UTF8String> ExternJobList;

      UTF8String Status;
      UTF8String RestoreStatus;
      UTF8String StartTime;
      UTF8String EndTime;
      int IdleTimeSum;
      int ServerId;
      int Pid;

      HBatchIcon *BatchIcon;

      __fastcall HInfo()
      {
         SendDate = true;
         CondNot = false;
         Enlarge = 0;
         AlarmTimeType = 0;
         IdleTimeSum = 0;
         ServerId = 0;
         Pid = 0;
         BatchIcon = NULL;
      }
   };

   void __fastcall GetInfo(HInfo &Info);
   bool __fastcall MatchServerIdx(int ServerIdx);
   void __fastcall LoadProperty_aux(h_xml::HXmlTree *Node, bool XmlPropertyFlag);

private :

   HInfo FInfo;
};

#endif
